package com.atguigu.springcloud.payment.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lenovo
 * @version 1.0
 * @date 2020/11/11 11:07
 */
@Slf4j
@RestController
@RequestMapping("payment")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class PaymentController {

    @Value("${server.port}")
    private Integer port;

    @GetMapping("nacos/{id}")
    public String getPayment(@PathVariable("id") Integer id) {

        return "nacos registry, server post:" + port + ". id=" + id;
    }

}
